package com.haizhi;

import com.haizhi.adapter.ConsumerAdapter;
import com.haizhi.exit.KillHandler;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
 * @author youfeng
 * @date 2018/3/28
 * 数据收集总入口
 */
public class Server {
    private static final Logger logger = LogManager.getLogger(Server.class);

    public static void main(String... args) {
        try {
            ConsumerAdapter adapter = new ConsumerAdapter();
            KillHandler killHandler = new KillHandler(adapter);
            adapter.listen();
        } catch (Exception e) {
            logger.error("程序异常:", e);
        }
    }
}